#ifndef __RC_H__
#define __RC_H__

#include "main.h"
#include "usart.h"

#ifdef __cplusplus
extern "C"
{
#endif

#define DBUS_MAX_LEN     (50)
#define DBUS_BUFLEN      (18)
#define DBUS_HUART       huart3

typedef struct __packed 
{
  int16_t ch0;
  int16_t ch1;
  int16_t ch2;
  int16_t ch3;
  int16_t roll;
  uint8_t sw1;
  uint8_t sw2;
} rc_info_t;
 
#define rc_Init   \
{                 \
		0,            \
		0,            \
		0,            \
		0,            \
		0,            \
		0,            \
		0,            \
}

extern rc_info_t rc;

void dbus_uart_init(void);//DBUS���ڳ�ʼ��
void uart_receive_handler(UART_HandleTypeDef *huart);

#ifdef __cplusplus
}
#endif

#endif
